package org.cnbi.utils.chart.component;

import org.cnbi.utils.pojo.CommonBean;
import org.cnbi.utils.string.StringUtil;
import org.codehaus.jackson.map.annotate.JsonSerialize;

public class Column extends CommonBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
	private String index;

	@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
	public String color;

	public Column() {
	}

	public Column(String scode, String sname, String color) {
		this.scode = scode;
		this.sname = sname;
		this.color = color;
	}

	public Column(String scode, String sname) {
		this.scode = scode;
		this.sname = sname;
	}

	public String getIndex() {
		return StringUtil.convertLetterToNumStr(scode);
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public String getScode() {
		return scode;
	}

	public void setScode(String scode) {
		this.scode = scode;
	}

	/**
	 * @return the color
	 */
	public String getColor() {
		return color;
	}

	/**
	 * @param color the color to set
	 */
	public void setColor(String color) {
		this.color = color;
	}
	
	

}
